package dao;

import java.util.List;

import javax.security.auth.Subject;

import model.EventType;
import modelInterfaces.ISubject;

/**
*
* Interface that all SubjectDAOs must support
*/
public interface ISubjectDAO {
    
	/**
	 * Create a {@link Subject} in database depending a parameter subject.
	 * @param subject	subject to be created
	 * @throws DAOException
	 * @see Subject
	 */	
	public void create(ISubject subject) throws DAOException;    
	
	
	/**
	 * Delete a {@link Subject} in database depending a parameter subject.
	 * @param subject	subject to be deleted
	 * @throws DAOException
	 * @see Subject
	 */	
	public void delete(ISubject subject) throws DAOException;
    
	
	/**
	 * Update a {@link Subject} in database depending a parameter subject.
	 * @param subject	subject to be updated
	 * @throws DAOException
	 * @see Subject
	 */		
	public void update(ISubject subject) throws DAOException;
    
    
	
	/**
	 * Retrieve a list with all subject of database.
	 * @return list with all subject of database. 
	 * @throws DAOException
	 * @see Subject
	 */			
	public List<ISubject> retrieveAll() throws DAOException;
    
	
	/**
	 * Retrieve a {@link Subject} list in database depending of parameter subject.
	 * @param subject subject is not to retrieve.
	 * @return list of objects according to a parameter subject.
	 * @throws DAOException
	 * @see Subject
	 */			
	public List<ISubject> retrieveAllExcept(ISubject subject) throws DAOException;
	
	
	/**
	 * Retrieve a {@link Subject} list in database depending of parameter type.
	 * @param type identifier number of a event type that realizes a subject
	 * @return list of events  according to event type
	 * @throws DAOException
	 * @see Subject
	 * @see EventType
	 */	   	
	public List<ISubject> retrieveAllFromType(int type) throws DAOException;
}
